<template>
  <el-dialog
    title="跟进记录"
    :visible.sync="dialogVisible"
    :show="show"
    :before-close="handleClose"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    append-to-body
  >
    <Follow :customerId="id"/>
  </el-dialog>
</template>

<script>
import Follow from '@/views/customer/common/follow'

export default {
  name: "DialogFollow",
  components: {Follow},
  props: {
    show: {
      type: Boolean,
      default: false
    },
    id: {
      type: [Number, String],
      default: ''
    },
    closeAction: {
      type: String,
      default: ''
    },
  },
  data() {
    return {
      dialogVisible: this.show,
    }
  },
  methods: {
    handleClose(done) {
      this.$emit('update:show', false)
      this.$emit('closeAction');
    },
  },
  watch: {
    show() {
      this.dialogVisible = this.show
    }
  }
}
</script>

<style scoped>
/deep/ .form-scrollbar-timeline {
  height: calc(100vh - 602px)
}
</style>
